package main

type order struct {
	ordId      int
	customerId int
}

type employee struct {
	name    string
	id      int
	address string
	salary  int
	country string
}

//下面是主函数的实现，就是通过传入的struct来生成SQL语句，加入我们要根据不同的结构体插入到不同的数据库表里面去。
func main() {
	o := order{
		ordId:      456,
		customerId: 56,
	}
	createQuery(o)

	e := employee{
		name:    "Naveen",
		id:      565,
		address: "Coimbatore",
		salary:  90000,
		country: "India",
	}
	createQuery(e)
	i := 90
	createQuery(i)
}

//@TODO:实现createQuery
func createQuery(q interface{}) {
	//最终的输出是这三个
	//insert into order values(456, 56)
	//insert into employee values("Naveen", 565, "Coimbatore", 90000, "India")
	//unsupported type
}
